package com.by.Service;

import org.springframework.core.io.InputStreamResource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 江俊俊
 * @version 1.0
 * @description
 * @date 2025/4/11 11:28
 * @since JDK1.8
 */
public interface MinioService {
    /**
     * 上传文件
     * @param file 文件
     * @return 文件路径
     */
    String upload( MultipartFile file);

    /**
     * 文件下载
     * @param url
     * @return
     */
    ResponseEntity<InputStreamResource> download(String url) throws Exception;

    /**
     * 文件删除
     * @param url
     * @return
     */
    int delete(String url);
}
